package cn.stylefeng.guns.modular.auth.demo;

import lombok.NoArgsConstructor;

/**
 * @author allen
 * @version 1.0
 * @date 2021/4/14 23:31
 */
@NoArgsConstructor
public abstract class Duck {
    FlyBehavior flyBehavior;
    QuackBehavior quackBehavior;
    public abstract  void disPlay();

    public void performFly() {
        flyBehavior.fly();
    }

    public void performQuack() {
        quackBehavior.quack();
    }


    public void swim() {
        System.out.println("all duck can swim");

    }
}
